﻿(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'PasteWord',
	title = '从Word粘贴',
	setValue = '<span id="_testPasteWord"></span>',
	dom = null,
	node = null,
	innerValue = '<p>&nbsp;<!--[if gte mso 9]><xml>\
 <w:WordDocument>\
  <w:View>Normal</w:View>\
  <w:Zoom>0</w:Zoom>\
  <w:PunctuationKerning/>\
  <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing>\
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>\
  <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>\
  <w:ValidateAgainstSchemas/>\
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>\
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>\
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>\
  <w:Compatibility>\
   <w:SpaceForUL/>\
   <w:BalanceSingleByteDoubleByteWidth/>\
   <w:DoNotLeaveBackslashAlone/>\
   <w:ULTrailSpace/>\
   <w:DoNotExpandShiftReturn/>\
   <w:AdjustLineHeightInTable/>\
   <w:BreakWrappedTables/>\
   <w:SnapToGridInCell/>\
   <w:WrapTextWithPunct/>\
   <w:UseAsianBreakRules/>\
   <w:DontGrowAutofit/>\
   <w:UseFELayout/>\
  </w:Compatibility>\
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>\
 </w:WordDocument>\
</xml><![endif]--><!--[if gte mso 9]><xml>\
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">\
 </w:LatentStyles>\
</xml><![endif]--><!--[if !mso]><object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui></object>\
<style>\
st1\:*{behavior:url(#ieooui) }\
</style>\
<![endif]--><!--[if gte mso 10]>\
<style>\
 table.MsoNormalTable\
	{mso-style-name:普通表格;\
	mso-tstyle-rowband-size:0;\
	mso-tstyle-colband-size:0;\
	mso-style-noshow:yes;\
	mso-style-parent:"";\
	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;\
	mso-para-margin:0cm;\
	mso-para-margin-bottom:.0001pt;\
	mso-pagination:widow-orphan;\
	font-size:10.0pt;\
	font-family:"Times New Roman";\
	mso-ansi-language:#0400;\
	mso-fareast-language:#0400;\
	mso-bidi-language:#0400;}\
</style>\
<![endif]--><!--[if gte mso 9]><xml>\
 <o:shapedefaults v:ext="edit" spidmax="1026"/>\
</xml><![endif]--><!--[if gte mso 9]><xml>\
 <o:shapelayout v:ext="edit">\
  <o:idmap v:ext="edit" data="1"/>\
 </o:shapelayout></xml><![endif]-->\
</p><p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-size:16.0pt;font-family:宋体" lang="EN-US">OPCClient</span></b><b style="mso-bidi-font-weight:normal">\
<span style="font-size:16.0pt;font-family:宋体">远程连接<span lang="EN-US">OPC</span>服务器操作系统配置手册<span lang="EN-US"></span></span></b></p>\
<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="font-size:12.0pt;font-family:宋体" lang="EN-US">\
<span style="mso-spacerun:yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>--------</span></b><b style="mso-bidi-font-weight:normal">\
<span style="font-size:12.0pt;font-family:宋体">吕林波 <span lang="EN-US">2008-8-6</span><span lang="EN-US"></span></span></b></p>\
<p class="MsoNormal"><b style="mso-bidi-font-weight:normal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体">一，操作系统用户<span lang="EN-US"></span></span></b></p>\
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体" lang="EN-US">1</span>\
<span style="mso-bidi-font-size:10.5pt;font-family:宋体">、在<span lang="EN-US">OPC</span>服务器上用\
<span lang="EN-US">Administrator</span>用户建立一个拥有管理员权限的用户并设置密码，一定要设置密码，不能为空，如：用户名：<span lang="EN-US">OPCClientUser </span>密码：<span lang="EN-US">123</span></span></p>\
<p class="MsoNormal" style="margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo1;tab-stops:list 18.0pt">\
<span style="mso-bidi-font-size:10.5pt;font-family:宋体;mso-bidi-font-family:宋体" lang="EN-US"><span style="mso-list:Ignore">2、\
<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp; </span></span></span><span style="mso-bidi-font-size:10.5pt;font-family:宋体">在<span lang="EN-US">OPCClient</span>服务器上用<span lang="EN-US">Administrator</span>用户建立一个相同的拥有管理员权限的用户并设置相同密码，一定要设置密码，不能为空，如：用户名：<span lang="EN-US">OPCClientUser </span>密码：<span lang="EN-US">123</span>，并用<span lang="EN-US">OPCClientUser</span>用户登入。<span lang="EN-US"></span></span></p>\
<p class="MsoNormal"><span style="mso-bidi-font-size:10.5pt;font-family:宋体">二、<b style="mso-bidi-font-weight:normal">防火墙设置（<span lang="EN-US">OPC</span>服务器和上都要进行设置）</b><span lang="EN-US"></span></span></p>\
<p class="MsoNormal" style="text-indent:21.0pt">\
<span style="mso-bidi-font-size:10.5pt;font-family:宋体" lang="EN-US">1</span><span style="mso-bidi-font-size:10.5pt;font-family:宋体">、关闭<span lang="EN-US">window</span>自带的防火墙。<span lang="EN-US"></span></span></p>\
<p class="MsoNormal" style="text-indent:21.0pt"><span style="mso-bidi-font-size:10.5pt;font-family:宋体" lang="EN-US">2</span>\
<span style="mso-bidi-font-size:10.5pt;font-family:宋体">、如果不关闭<span lang="EN-US">windows</span>自带的防火墙，则需要在<span lang="EN-US">window</span>防火墙管理界面上配置允许客户端程序访问权限和开放<span lang="EN-US">OPC</span>通讯<span lang="EN-US">135</span>端口。步骤如下：<span lang="EN-US"></span></span></p>\
<p class="MsoNormal" style="text-indent:21.0pt"><span style="mso-bidi-font-size:10.5pt;font-family:宋体" lang="EN-US"><span style="mso-spacerun:yes">&nbsp;</span>1</span>\
<span style="mso-bidi-font-size:10.5pt;font-family:宋体">）<span lang="EN-US"></span></span></p>',
	cmds = [
		[1500, {name : 'a.PasteWord', type: 'click'}],
		[300, {fun: function() {
			var iframe = $('iframe[name=iframe_PasteWord]')[0],
			idom = iframe.contentWindow.document || iframe.contentDocument;
			idom.body.innerHTML=innerValue;
			dom = E.get('document');
			dom.body.innerHTML = setValue;
			node = dom.getElementById('_testPasteWord');
			selection.selectNode(node,false);
		}}],
		[300, {name: '#demo-PasteWord', type: 'mouseover'}],
		[1000, {name: '#panel_PasteWord input[name=panel-submit]', type: 'click'}]
	];

T.addTest(testName, cmds, title);
})(jQEditor,AutoTest, jQuery)